package com.supor.aiot.mine.api;

import com.android.baseconfig.base.BaseApiResult;
import com.android.baseconfig.base.DataApiResult;
import com.supor.aiot.common.app.Constants;
import com.supor.aiot.mine.bean.CookingEvalDetail;
import com.supor.aiot.mine.bean.CookingRecordBean;
import com.supor.aiot.mine.bean.CookingRecordNumBean;
import com.supor.aiot.mine.bean.RecipeEvalBean;

import java.util.List;

import io.reactivex.rxjava3.core.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * @author: zook
 * @date: 2021/10/15
 */
public interface CookingRecordSetvice {


    @GET(Constants.OSS_API + "foodTDeviceOpLog/getCount")
    Observable<BaseApiResult<CookingRecordNumBean>> getCookingNum();

    @GET(Constants.OSS_API + "foodTDeviceOpLog/getRecipeCookLogNew")
    Observable<BaseApiResult<DataApiResult<List<CookingRecordBean>>>> getCookingRecordList(
            @Query("isEval") int isEval,//1是已评价0是未评价
            @Query("page") int page,
            @Query("limit") int limit);

    @GET(Constants.OSS_API + "foodTDeviceOpLog/getRecipeCookLogNew")
    Observable<BaseApiResult<DataApiResult<List<CookingRecordBean>>>> getCookingRecordListWithMacArr(
            @Query("isEval") int isEval,//1是已评价0是未评价
            @Query("productModel") String productModel,
            @Query("page") int page,
            @Query("limit") int limit);

    @GET(Constants.OSS_API + "foodTDeviceOpLog/getRecipeCookLogNew")
    Observable<BaseApiResult<DataApiResult<List<CookingRecordBean>>>> getCookingRecordList(
            @Query("page") int page,
            @Query("limit") int limit);

    @GET(Constants.OSS_API + "foodTDeviceOpLog/getRecipeCookLogNew")
    Observable<BaseApiResult<DataApiResult<List<CookingRecordBean>>>> getCookingRecordListWithMacArr(
            @Query("productModel") String productModel,
            @Query("page") int page,
            @Query("limit") int limit);

    @GET(Constants.OSS_API + "foodTCookEvaluate/page")
    Observable<BaseApiResult<CookingEvalDetail>> getCookingEvalDetail(
            @Query("logId") String logId);

    @POST(Constants.OSS_API + "foodTCookEvaluate")
    Observable<BaseApiResult<RecipeEvalBean>> submitEval(
            @Body RequestBody requestBody);

}